Fix several occurences of the improper_ctypes
lint in tests where that was not the intent
#111972
+247
−251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses most of #53858
Summary of changes:
allow(improper_ctypes)
removed (it was not doing anything anymore)tests/ui/lint/lint-ctypes-fn.rs
tests/ui/abi/variadic-ffi.rs
tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs
tests/ui/abi/foreign/foreign-fn-with-byval.rs
tests/debuginfo/type-names.rs
tests/codegen/riscv-abi/riscv64-lp64-lp64f-lp64d-abi.rs
(note: it's suspicious that there's an empty struct here that works, why is that the case?)Lint removed by addressing the root problem
tests/ui/issues/issue-3656.rs
tests/ui/issues/issue-51907.rs
tests/ui/repr/align-with-extern-c-fn.rs
tests/ui/lint/clashing-extern-fn.rs
tests/ui/lint/clashing-extern-fn-recursion.rs
tests/ui/abi/issue-28676.rs
tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs
tests/ui/abi/extern/extern-pass-TwoU8s.rs
tests/ui/abi/extern/extern-pass-TwoU16s.rs
tests/ui/abi/extern/extern-pass-TwoU32s.rs
tests/ui/abi/extern/extern-pass-TwoU64s.rs
tests/ui/abi/extern/extern-return-TwoU8s.rs
tests/ui/abi/extern/extern-return-TwoU16s.rs
tests/ui/abi/extern/extern-return-TwoU32s.rs
tests/ui/abi/extern/extern-return-TwoU64s.rs
tests/ui/abi/abi-sysv64-register-usage.rs
tests/ui/cfg/conditional-compile.rs
tests/ui/abi/abi-sysv64-arg-passing.rs
(note: one instance here is intentional in the test, can this be fixed?)tests/ui/lint/clashing-extern-fn.rs
(note: two instances here are intentional)Intentional or the lint firing/not firing is part of the test
tests/ui/lint/warn-ctypes-inhibit.rs
tests/ui/issues/issue-16441.rs
tests/ui/lint/lint-ctypes.rs
tests/ui/abi/extern/extern-pass-empty.rs
(note:#![allow(improper_ctypes)] // FIXME: this test is inherently not FFI-safe.
)Unknown/Not addressed in this PR/Needs more investigation
tests/ui/issues/issue-28600.rs
(possibly intentional for ICE)tests/ui/issues/issue-26997.rs
(possibly intentional for ICE)tests/ui/issues/issue-38763.rs
(possibly intentional for ICE)tests/ui/issues/issue-5754.rs
(possibly intentional for ICE)tests/ui/foreign/nil-decl-in-foreign.rs
(maybe an LLVM bug test? It was fixed with no links to how.)tests/ui/mir/mir_cast_fn_ret.rs
(I don't know enough about this test)tests/ui/mir/mir_codegen_calls.rs
(I don't know enough about this test)tests/ui/abi/numbers-arithmetic/i128-ffi.rs
(note: it's testing 128-bit ints in FFI, this is a known problem cc i128 / u128 are not compatible with C's definition. #54341 128-bit integers marked as having an unknown stable ABI #78473 )